package com.inspire.springboot.controller;

import com.inspire.springboot.entity.TestCases;
import com.inspire.springboot.entity.TestInfo;
import com.inspire.springboot.service.CoverageService;
import com.inspire.springboot.service.WriteExcelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author :inspire
 * @date :Created in 2025/9/30 14:10
 * @description:
 * @modified By:inspire
 * @version:
 */
@RestController
@RequestMapping("/zoa")
public class CoverageController {

    @Autowired
    private CoverageService coverageService;

    @Autowired
    private WriteExcelService writeExcelService;

    @PostMapping("getRelatedCovOfDetail")
    public String getRelatedCovOfDetail(@RequestBody TestCases testCases){
        return coverageService.getRelatedCovOfDetail(testCases);
    }

    @PostMapping("writeTestReportToExcel")
    public String writeTestReportToExcel(@RequestBody TestInfo testInfo){
        return  writeExcelService.writeTestReportToExcel(testInfo);
    }
}
